var status = -1;

function action(c, b, a) {
    if (c == 1) {
        status++
    } else {
        status--
    }
    if (status == 0) {
        if (cm.getMapId() == 540010002) {
            cm.dispose()
        } else {
            cm.askYesNo("The plane will be taking off soon, Will you leave now? You will have buy the plane ticket again to come in here.")
        }
    } else {
        cm.warp(540010000, 0);
        cm.dispose()
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};